package com.gaofans.nrpc.client.route;

import com.gaofans.nrpc.common.processor.ServiceAuthority;

import java.net.URI;

/**
 * 服务实例
 * @author GaoFans
 */
public class ServiceInstance {

    private String serviceId;
    private String instanceId;
    private ServiceAuthority authority;
    private URI uri;

    public ServiceInstance(String serviceId, String instanceId, ServiceAuthority authority) {
        this.serviceId = serviceId;
        this.instanceId = instanceId;
        this.authority = authority;
    }

    public String getServiceId() {
        return serviceId;
    }

    public void setServiceId(String serviceId) {
        this.serviceId = serviceId;
    }

    public String getInstanceId() {
        return instanceId;
    }

    public void setInstanceId(String instanceId) {
        this.instanceId = instanceId;
    }

    public ServiceAuthority getAuthority() {
        return authority;
    }

    public void setAuthority(ServiceAuthority authority) {
        this.authority = authority;
    }

    public URI getUri() {
        return uri;
    }

    public void setUri(URI uri) {
        this.uri = uri;
    }

    @Override
    public String toString() {
        return "ServiceInstance{" +
                "serviceId='" + serviceId + '\'' +
                ", instanceId='" + instanceId + '\'' +
                ", authority=" + authority +
                ", uri=" + uri +
                '}';
    }
}
